<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">店铺管理</h4>
</div>
<div class="wrapper-md">
    <div class="hbox hbox-auto-xs hbox-auto-sm" ng-controller="shopDetailInfoCtrl">
        <div class="col col-md-9 no-padder">
            <div class="bg-white">
                <div class="wrapper-md">
                    <div class="row">
                        <div class="col-sm-7">
                            <div class="thumb-md pull-left m-r-xs">
                                <img src="img/default.png" ng-src="{{app.image.shop}}{{shop.shopHeadImgUrl}}" err-src="img/error.png">
                            </div>
                            <div class="clear col-sm-7">
                                <div class="m-b-sm">
                                    <div class="inline">
                                        <span class="h3 font-bold text-black m-r-xs text-ellipsis pull-left">{{shop.name==null?'--':shop.name}}</span>
                                        <div class="pull-left bg-light rounded m-r-xs" ng-if="shop.auditStatus==0">
                                            <span class="inline m-xs h6 font-normal rounded"><i class="icon-badge text-muted m-r-xs"></i>等待审核中</span>
                                        </div>
                                        <div class="pull-left bg-danger rounded m-r-xs"  ng-if="shop.auditStatus==1">
                                            <span class="inline m-xs h6 font-normal rounded text-dark"><p class="text-white inline m-n">审核不通过</p><i class="m-l-xs fa fa-question-circle text-white pos-rlt h6 ng-scope" popover-placement="top" popover="原因:{{shop.auditFailDescription}}" popover-trigger="mouseenter"></i></span>
                                        </div>
                                        <div class="pull-left bg-success rounded m-r-xs" ng-if="shop.auditStatus==2">
                                            <span class="inline m-xs h6 font-normal rounded"><i class="icon-badge text-warning m-r-xs"></i>审核通过</span>
                                        </div>
                                        <span class="h6 font-bold text-black pull-left m-n block">
                                            <span class="inline m-xs h6 font-normal rounded"><i class="fa fa-tag text-muted m-r-xs"></i>{{shop.setMealName==null?'--':shop.setMealName}}</span>
                                        </span>
                                    </div>
                                </div>
                                <div class="m-b-sm">
                                    <p class="h6 text-muted"><i class="icon-pointer m-r-xs"></i>{{shop.address==null?'-- --':shop.address}}</p>
                                </div>
                                <div class="m-b-sm">
                                    <p class="m-l-xs l-h h6 text-muted block">{{shop.description==null?'-- --':shop.description}}</p>
                                </div>
                                <div class="m-b-sm">
                                    <a class="btn btn-sm btn-rounded btn-success m-r-xs" ui-sref="app.shopDatum"><i class="fa fa-gear m-r-xs"></i>设置</a>
                                    <button class="btn btn-sm btn-rounded btn-info" ng-click="createQrcode(shop.id,0)" ng-if="!shop.wechatCodeUrl"><i class="fa fa-qrcode m-r-xs"></i>生成二维码</button>
                                </div>
                            </div>
                        </div>
                        <div class="pull-right col">
                            <div class="pull-left">
                                <div class="panel-body btn-group-vertical">
                                    <button class="btn btn-sm btn-rounded btn-info"ng-click="downloadQrcode(shop.id)" ng-if="shop.wechatCodeUrl"><i class="fa fa-qrcode m-r-xs"></i>下载二维码</button>
                                    <!--<button class="btn btn-sm btn-rounded btn-info" ng-click="createQrcode(shop.id,0)" ng-if="!shop.wechatCodeUrl"><i class="fa fa-qrcode m-r-xs"></i>生成二维码</button>-->
                                    <button class="btn btn-sm btn-rounded btn-info" ng-click="createQrcode(shop.id,1)" ng-if="shop.wechatCodeUrl"><i class="fa fa-qrcode m-r-xs"></i>重置二维码</button>
                                </div>
                            </div>
                            <div class="pull-right" ng-if="shop.wechatCodeUrl" style="margin-right: 20px" ng-init="shop.mo=false" ng-click="imgMoShow()">
                                <img src="{{app.image.qrcode}}{{shop.wechatCodeUrl}}" err-src="img/error.png" class="w-xs"/>
                            </div>
                            <div class="mo" ng-if="shop.mo" ng-click="imgMoHide()">
                                <img class="moimg" src="{{app.image.qrcode}}{{shop.wechatCodeUrl}}" err-src="img/error.png">
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!--new 评价版样-->
            <div>
                <div class="bg-white b-b b-t">
                    <div class="inline padder-v pos-rlt" ng-class="{false:'shop-select-top',true:'shop-select-top-active'}[selectState==0]" ng-click="changeState()">
                        <div class="shop-tri-top"></div>
                        <span class="inline padder-md font-bold b-r">累计评价</span>
                    </div>
                    <div class="inline padder-v pos-rlt" ng-class="{false:'shop-select-top',true:'shop-select-top-active'}[selectState==1]" ng-click="changeState()">
                        <div class="shop-tri-top"></div>
                        <span class="inline padder-md font-bold b-r">公告内容</span>
                    </div>
                </div>
                <!--所有商品评价-->
                <div ng-show="selectState==0">
                    <div class="panel-body b-b bg-white">
                        <div class="pull-left text-center m-r padder-md b-r">
                            <span class="block font-bold h6 m-b-xs">商品平均评分</span>
                            <span class="h1 text-success font-bold ">{{shopScore|number:1}}</span>
                            <div>
                                <rating ng-model="shopScore" max="5" readonly="true" on-hover="hoveringOver(value)" on-leave="overStar = null" state-on="'fa fa-star text-warning'" state-off="'fa fa-star text-muted'"></rating>
                            </div>
                        </div>
                        <div class="padder-md pull-left">
                            <div class="bg-grade">
                                <div class="bg-grade-bar" ng-style="scorePercent">
                                    <span class="bg-grade-span-box">{{shopScore|number:1}}</span>
                                    <div class="bg-grade-tri-box"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-body panel">
                        <div>
                            <div class="panel-body b-b" ng-repeat="item in list">
                                <div class="pull-left m-r w-sm">
                                    <span class="block h6 font-bold m-b-xs">{{item.goodsName}}</span>
                                    <span class="block h6 text-muted m-b-xs">{{item.skuContentName==null?'-- --':item.skuContentName}}</span>
                                </div>
                                <div class="pull-left">
                                    <span class="block h6 font-bold m-b-xs w-xxl">{{item.content}}</span>
                                    <div>
                                        <div class="inline m-r-xs">
                                            <rating ng-model="item.score" max="5" readonly="isReadonly" on-hover="hoveringOver(value)" on-leave="overStar = null" state-on="'fa fa-star text-warning'" state-off="'fa fa-star text-muted'"></rating>
                                        </div>
                                        <span class="inline h5 font-bold">{{item.score|number:1}}</span>
                                    </div>
                                    <div class="inline" ng-repeat="subitem in item.images track by $index">
                                        <img src="img/default.png" ng-src="{{app.image.evaluate}}{{subitem}}" err-src="img/error.png" ng-click="openUrl(app.image.evaluate+subitem)" class="thumb-sm m-r-xs"/>
                                    </div>
                                    <span class="block text-muted">{{item.createdTime}}</span>
                                </div>
                                <div class="pull-right text-center">
                                    <img src="{{item.avatarUrl}}" class="thumb-sm img-circle" error-src="img/error.png"/>
                                    <span class="block text-muted font-bold w-xs text-ellipsis">{{item.nickName}}</span>
                                </div>
                            </div>
                        </div>
                        <div ng-if="list.length<=0 && !app.loading" class="padder-v text-center">
                            <span class="h6">~未搜索到任何数据~</span>
                        </div>
                        <div>
                            <circle-loading ng-if="app.loading"></circle-loading>
                        </div>
                        <footer class="panel-footer">
                            <div class="row">
                                <div class="col-sm-offset-4 col-sm-3 text-center">
                                    <small class="text-muted inline m-t-sm m-b-sm">显示第 {{startRow}} 至 {{endRow}} 项结果，共 {{totalItems}} 项</small>
                                </div>
                                <div class="col-sm-5 text-right text-center-xs m-t-xs">
                                    <pagination boundary-links="true" total-items="totalItems" ng-model="currentPage"
                                                ng-change="pageChanged()" max-size="{{maxPageRow}}" class="pagination-sm m-t-none m-b"
                                                previous-text="上一页" next-text="下一页"
                                                first-text="首页" last-text="尾页"></pagination>
                                </div>
                            </div>
                        </footer>
                    </div>
                </div>

                <!--店铺公告-->
                <div ng-show="selectState==1">
                    <div class="panel-body panel">
                        <div class="b-b panel-body"  ng-repeat="item in list">
                            <span class="block h5 m-b-sm font-bold">{{item.name}}</span>
                            <span class="block h6 m-b-sm">{{item.content}}</span>
                            <span class="block text-muted">{{item.endTime}}</span>
                        </div>
                        <div ng-if="list.length<=0 && !app.loading" class="padder-v text-center">
                            <span class="h6">~未搜索到任何数据~</span>
                        </div>
                        <div>
                            <circle-loading ng-if="app.loading"></circle-loading>
                        </div>
                    </div>
                </div>

            </div>

        </div>
        <div class="col col-md-3 lter">
            <div class="panel-body panel">
                <div class="bg-white">
                    <div class="bg-success panel-body">
                        <div class="btn-addon pull-left m-r">
                            <i class="block  icon-users m-n"></i>
                        </div>
                        <div class="pull-left text-left">
                            <span class="block text-white h5 m-b-xs">商户公告</span>
                            <span class="block text-white h6">商户用于公告商家相关信息</span>
                        </div>
                    </div>
                    <div class="fa-border panel-body padder-v text-center">
                        <div class="inline">
                            <button class="btn m-b-xs btn-default btn-sm btn-rounded" ui-sref="app.noticeAdd">添加商家公告</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

